#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int fun(int number)
{
    int tmp = 0;
    int num = number;
    while (number)
    {
        tmp = tmp * 10 + num % 10;
        num /= 10;
    }
    return tmp;
}
int fin(int number, int x)
{
    if (number != 0)
    {
        return fin(number / 10, x + 1) + number % 10 * x;
    }
    else
    {
        return 0;
    }
}
int main() {
    int a, b, c;
    char d,d1;
    scanf("%d-%d-%d-%c", &a, &b, &c, &d);
    d1 = (1 * a + fin(fun(b), 2) + fin(fun(c), 5)) % 11;
    d1 = d1 == 10 ? 'X' : d1 + '0';
    if (d1 == d)
    {
        printf("Right");
    }
    else
    {
        printf("%d-%d-%d-%c", a, b, c, d1);
    }
    return 0;
}
int findMaxConsecutiveOnes(int* nums, int numsSize) {
    int i = 0;
    int count = 0;
    int max = 0;
    for (i = 0; i < numsSize; i++)
    {
        if (nums[i] != 0)
        {
            count++;
        }
        if (count > max)
        {
            max = count;
        }
        if (nums[i] == 0)
        {
            count = 0;
        }
    }
    return max;
}

#include <stdio.h>
#include<stdbool.h>

bool perf(int num)
{
    int i = 1;
    int sum = 0;
    while (i < num)
    {
        if (num % i == 0)
        {
            sum += i;
        }
        i++;
    }
    if (sum == num)
    {
        return true;
    }
    else
    {
        return false;
    }
}
int main() {
    int n;
    int i = 0;
    int count = 0;
    scanf("%d", &n);
    for (i = 1; i <= n; i++)
    {
        if (perf(i))
        {
            count++;
        }
    }
    printf("%d", count);
    return 0;
}